1. Technical Field
The present invention pertains to software conversion or translation systems. In particular, the present invention pertains to a computer system for translating procedurally-oriented software into object-oriented software.
2. Discussion of Related Art
One of the greatest challenges facing commercial sector and government information technology (IT) professionals is the maintenance of legacy systems. Often, such legacy systems include legacy software with tens of thousands or even millions of lines of code written in unstructured or otherwise outdated software languages. Much of this legacy software cannot execute on modern hardware platforms employing present day operating systems.
The problems associated with maintaining such legacy systems are significant and include: a shortage of trained personnel competent to support the hardware and operating system platforms upon which the legacy system executes; a shortage of trained personnel capable of implementing changes/updates/fixes within the legacy software itself; inability to integrate new hardware (e.g., memory storage devices, printers/peripheral, communication devices) with older hardware/operating system platforms; and a buildup of unreliable patches and unintelligible quick fixes within the legacy code that undermine reliability and operational effectiveness. Such issues typically translate into increased maintenance costs and severely restrict the ability to take advantage of advancements in technology.
Typically, the deficiencies associated with legacy software described above are corrected by rewriting the legacy application in a modern programming language that is compatible with current hardware platform/operating systems and/or executes within a virtual, platform independent execution environment. However, depending upon the complexity and number of software lines of code (SLOC) associated with a legacy system, such legacy system re-writes can require thousands of man-hours. To reduce the number of man-hours required for such a legacy system re-write, a large number of software tools have been developed that attempt to automate translation of legacy application software modules from a legacy software language to a modern software language. Unfortunately, such conventional tools have met only with limited degrees of success.
The current state of the art in software development relies heavily on the notion of object-oriented design. The essence of object-oriented design involves abstraction, which is the process by which a programmer creates a user-defined data type for the language to process. Support for data abstraction makes object-oriented (OO) languages ideal for use in rewriting legacy systems. By way of example only, source code designed to operate in a CDC Cyber platform environment is designed to make use of 60-bit word sizes, 6-bit bytes, one's complement binary word formats, and use the CDC Fortran I-Blocked/W-Record binary file structure. Using object-oriented design abstraction to create user-defined data types, the special data structure and formatting needs of legacy system software can be accommodated. For example, using object-oriented design abstraction, unique requirements associated with code designed specifically to operate in the CDC Cyber environment can be accommodated, allowing the original code to be translated into code that operates within modern hardware platform/operating system environments with 32 or 64 bit word sizes, 8-bit bytes, and two's complement binary word formats.
A current object-oriented software language that supports object-oriented design is known as C++. One mechanism by which the C++ language supports the elements of object-oriented design abstraction is through the use of object-oriented classes. A class provides the ability to encapsulate the data representation and behavior of a user-defined type within details internal to the implementation of the class, and behind the public interface of an abstract data type.
In an object-oriented language, classes may be used to group both data variables and subroutines together. When a subroutine is grouped into a class it becomes a class member function (also known as a class method.) A class includes data members, class methods and custom operators, all interrelated, such that the aggregate (i.e., the class) acts as a unique object. Class data members and class methods are generally grouped together into a class based on some shared relationship.
An instantiation of such a class is known as an object. When a program is written such that most if not all non-local data variables and subroutines are class members, the program is considered to be object-oriented. That is to say, an object-oriented program is a collection of objects (instantiated classes) which interact with each other for some greater purpose.
Prior to object-oriented programming, the most common programming paradigm was procedurally-oriented programming. Procedurally-oriented languages do not have constructs similar to classes which contain both data and subroutine members. Many legacy applications have been written using a procedural programming paradigm. These legacy programming languages do not support the modern object-oriented paradigm and include applications that typically include a block of global data variables accessed by any number of subroutines. One such procedural language is Fortran. These global data blocks are commonly used to organize data variables by some related function or task. Fortran, for example, supports use of a specific COMMON block structure that allows the programmer to group data variables based on some shared purpose.
The related art has provided several language translators. For example, F2c maintained by AT&T, For_c available from Cobalt Blue, Pfc available from Promula and Fortran2c available from Realistic Technologies Inc. (RTI), each translate a type of Fortran to C. For_struct, available from Cobalt Blue, translates Fortran IV to Fortran 77, while For_cpp from Cobalt Blue and Evolution 2000 available from The Software Revolution, Inc. each translate Fortran source code to C++. C2c++ freeware translates C source code to C++ and an F2j prototype translates Fortran source code to Java. However, no conventional software tool currently exists that can exploit the organization of global data blocks, and their associations with the respective modules of procedurally-oriented code, to facilitate the automatic construction of object-oriented classes and to improve the accuracy and effectiveness of object-oriented code generated from procedurally-oriented code.
Accordingly, a need in the art exists to improve the accuracy and effectiveness of object-oriented code generated from procedurally-oriented code by using information derived from relationships between legacy or procedurally-oriented software modules and their associated common block or global data structures.